export default {
  namespaced: true,
  state: {
    address: "",
    token: '',
    userInfo: '',
    backUrl: ''
  },
  mutations: {
    setAddress(state, value) {
      state.address = value
    },
    // 修改userInfo
    setUserInfo(state, value) {
      state.userInfo = value
    },
    // 修改token
    setToken(state, value) {
      state.token = value
    },
    // 删除用户信息与token
    logout(state) {
      state.token = ''
      state.userInfo = ''
    },
    // 登录完成回跳地址
    setBackUrl(state, value) {
      state.backUrl = value
    }
  }
}